package ch6.ex9;

import static ch6.print.Print.*; 

class Component1{
	public Component1() {
		println("Component1");
	}
}

class Component2{
	public Component2() {
		println("Component2");
	}
}

class Component3{
	public Component3() {
		println("Component3");
	}
}

class Root{
	Component1 c1 = new Component1();
	Component2 c2 = new Component2();
	Component3 c3 = new Component3();
	
	public Root() {
		println("Root");
	}
}

class Stem extends Root{
	Component1 c1 = new Component1();
	Component2 c2 = new Component2();
	Component3 c3 = new Component3();
	
	public Stem() {
		println("Stem");
	}
}

public class ConstructorOrder {
	public static void main(String... args){
		new Stem();
	}

}
